[IPv4 leases] Refresh the observation of a leased IPv4 block
curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cidr": "<string>",
"mode": "gre",
"customer_asn": 123,
"expected_origin": 123,
"expected_origin_name": "<string>",
"status": "active",
"lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whmcs_service_id": 123,
"gre": {
"our_endpoint_ip": "127.0.0.1",
"remote_ip": "127.0.0.1",
"local_internal_ip": "<string>",
"peer_internal_ip": "127.0.0.1",
"desired_state": "up",
"last_checked_at": "2023-11-07T05:31:56Z",
"last_check_ok": true
},
"observation": {
"observed_at": "2023-11-07T05:31:56Z",
"origins": [
123
],
"visibility_percent": 0,
"rpki_status": "<string>",
"route_objects": [
{
"prefix": "<string>",
"origin": 123
}
],
"rdns": [
{
"zone": "<string>",
"nameservers": [
"<string>"
]
}
],
"roas": [
{
"prefix": "<string>",
"asn": 123,
"max_length": 123
}
],
"as_names": {}
},
"blocklist": {
"checked_at": "2023-11-07T05:31:56Z",
"listed_ip_count": 123,
"lists": [
{
"code": "<string>",
"name": "<string>",
"category": "spam",
"status": "ok",
"checked_at": "2023-11-07T05:31:56Z"
}
]
},
"ip_intelligence": {
"ip": "127.0.0.1",
"country_code": "<string>",
"country_name": "<string>",
"continent_code": "<string>",
"continent_name": "<string>",
"currency_code": "<string>",
"time_zone": "<string>",
"organization": "<string>",
"asn": 123,
"asn_name": "<string>",
"threats": {
"tor": true,
"vpn": true,
"icloud_relay": true,
"datacenter": true,
"proxy": true,
"anonymous": true,
"attacker": true,
"abuser": true,
"threat": true,
"bogon": true
},
"threat_count": 123,
"trust_score": 123,
"trust_level": "low",
"blocklists": [
{
"name": "<string>",
"site": "<string>",
"type": "<string>"
}
],
"fetched_at": "2023-11-07T05:31:56Z"
}
}Network
[IPv4 leases] Refresh the observation of a leased IPv4 block
Observe the block again in RIPEstat and the RIPE database, look its representative address up on ipdata.co, store both and return the block. A failed ipdata lookup keeps the previous IP intelligence. Rate limited per user.
POST
/
v1
/
organizations
/
{organization_id}
/
network
/
ipv4-blocks
/
{block_id}
/
refresh
[IPv4 leases] Refresh the observation of a leased IPv4 block
curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/network/ipv4-blocks/{block_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cidr": "<string>",
"mode": "gre",
"customer_asn": 123,
"expected_origin": 123,
"expected_origin_name": "<string>",
"status": "active",
"lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whmcs_service_id": 123,
"gre": {
"our_endpoint_ip": "127.0.0.1",
"remote_ip": "127.0.0.1",
"local_internal_ip": "<string>",
"peer_internal_ip": "127.0.0.1",
"desired_state": "up",
"last_checked_at": "2023-11-07T05:31:56Z",
"last_check_ok": true
},
"observation": {
"observed_at": "2023-11-07T05:31:56Z",
"origins": [
123
],
"visibility_percent": 0,
"rpki_status": "<string>",
"route_objects": [
{
"prefix": "<string>",
"origin": 123
}
],
"rdns": [
{
"zone": "<string>",
"nameservers": [
"<string>"
]
}
],
"roas": [
{
"prefix": "<string>",
"asn": 123,
"max_length": 123
}
],
"as_names": {}
},
"blocklist": {
"checked_at": "2023-11-07T05:31:56Z",
"listed_ip_count": 123,
"lists": [
{
"code": "<string>",
"name": "<string>",
"category": "spam",
"status": "ok",
"checked_at": "2023-11-07T05:31:56Z"
}
]
},
"ip_intelligence": {
"ip": "127.0.0.1",
"country_code": "<string>",
"country_name": "<string>",
"continent_code": "<string>",
"continent_name": "<string>",
"currency_code": "<string>",
"time_zone": "<string>",
"organization": "<string>",
"asn": 123,
"asn_name": "<string>",
"threats": {
"tor": true,
"vpn": true,
"icloud_relay": true,
"datacenter": true,
"proxy": true,
"anonymous": true,
"attacker": true,
"abuser": true,
"threat": true,
"bogon": true
},
"threat_count": 123,
"trust_score": 123,
"trust_level": "low",
"blocklists": [
{
"name": "<string>",
"site": "<string>",
"type": "<string>"
}
],
"fetched_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Path Parameters
The unique identifier (UUID) of the leased IPv4 block
The unique identifier (UUID) of the organization
Response
The block, freshly observed
gre- GRE tunnel (announced by AS51269)asn- Customer ASN
Available options:
gre, asn active- Activesuspended- Suspendedreleased- Released
Available options:
active, suspended, released Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

